<template>
	<view>
		
		 <public-header></public-header>
		<rList :config="config" :columnRowConfig="columnRowConfig" @on-list-item-checked="onItemChecked" :searchValKey="searchValKey" :condition="condition" style="height:calc(100vh - 80px)">
			
			<template v-slot:rListItem = "itemValue">
				<uni-row class="demo-uni-row">
					<uni-col  class=" text-blod"  :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
						{{itemValue.item.member_name}}
					</uni-col>
					<uni-col  :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
						{{itemValue.item.member_phone}}
					</uni-col>
					
					<uni-col class="text-right text-blod" :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
						{{itemValue.item.member_state}}
					</uni-col>
					
				</uni-row>
			</template>
			<template v-slot:rLayoutRight>
				
					<!-- <view class="list-detail"  @click="onItemChecked(detailData)">
						{{detailData}}
					</view> -->
					
			</template>
		</rList>
	</view>
</template>

<script>
	
	import rList from '@/components/retail-list/retail-list.vue'
	export default {
		data() {
			return {
				config:{
					serviceName:"srvretail_member_info_select",
					listLayout:"listAndDetail",  // listAndDetail listAndFilter  list
					detailPath:"simple",  //  simple  基础的； 或者配置页面路由 路由格式待定
				},
				detailData:null,
				condition:[],
				searchVal:"",
				searchValKey:"member_phone", // 查询的字段名  "col,col,col"
				columnRowConfig:[{
							columns:['','member_name','member_phone'],
							showType:"usercard",   // usercard datapanel
							section:"",
							label:false,
							colspan:4,   // 列
							buttons:[{
								button_name:"编辑",
								button_type:"edit",
								service:{
									select:"",
									update:"",
									add:"",
									delete:""
								}
							}]
						},{
							columns:['member_level','#children'],
							showType:"datapanel",   // usercard
							section:"",
							label:'会员卡',
							colspan:12   // 列
						}]
			}
		},
		components:{
			rList
		},
		methods: {
			onItemChecked(e){
				console.log("onItemChecked",e)
				this.detailData = JSON.stringify(e)
			}
		},
		onLoad(option) {
			console.log("option",option)
		},
		onShow(option) {
			
		}
	}
</script>

<style lang="scss" scoped>
.list-detail{
	border-radius: 10rpx;
	background-color: #fff;
	box-shadow: #333;
}
</style>
